<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
		<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
		<html>
		<head>
			<title>回复管理</title>
			<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
			<jsp:include page="/WEB-INF/views/include/newhead.jsp" />
		</head>
		<body class="childrenBody site-block">
			<header class="larry-personal-tit">
				<span>
				    <!-- contentReply 将user对应替换 -->
					<c:if test="${empty contentReply.id}">新增</c:if>
					<c:if test="${not empty contentReply.id}">修改</c:if>
				</span>
			</header>
			
			<div class="mainCon">
				<form:form id="inputForm" autocomplete="off" modelAttribute="contentReply" action="${ctx}/content/contentReply/save" method="post">
					<form:hidden path="id"/>
					<sys:message content="${message}"/>
					
						<div class="layui-form-item">
							   <div class="layui-inline">
									<label class="layui-form-label"><font color="red">*</font>发布平台</label>
									<div class="layui-input-inline layui-input-inline-one">
										     <div class="checkbox icheck-nephritis checkbox-extend">
												<input onclick="hadChecked('dy');"  type="checkbox" name="doPlatform" value="1" id="dy" />
												<label for="dy">抖音</label>
					                          </div>
					                          <div class="checkbox icheck-nephritis checkbox-extend">
												<input onclick="hadChecked('ks');"   type="checkbox" name="doPlatform" value="2" id="ks" />
												<label for="ks">快手</label>
					                         </div>
					                         <div class="checkbox icheck-nephritis checkbox-extend">
												<input onclick="hadChecked('xhs');" type="checkbox" id="xhs" name="doPlatform" value="3" />
												<label for="xhs">小红书</label>
					                         </div>
									</div>
							   </div>
						</div>
						
						<div class="layui-inline">
									<label class="layui-form-label">选择账号</label>
									<div class="layui-input-inline layui-input-inline-one">
								      <sys:dialogTableSelect id="role" name="roleIds" value="${contentPublish.accounts}"
										cssClass="layui-input layui-input-treeselect " labelName="" labelValue="${contentPublish.accounts}" title="选择账号"
										width="1000" tableSelectId="id" tableSelectName="name" height="600" allowClear="true"
										includeUrl="/WEB-INF/views/modules/sys/roleListBydialog.jsp?roleType=1"
										singleSelect="false" params=""  draggable="true"/>
								   </div>
								   (为空默认全部)
						</div>
						
							<div class="layui-form-item">
							   <div class="layui-inline">
									<label class="layui-form-label">回复关键字</label>
									<div class="layui-input-inline">
										<form:input path="replyKeys" placeholder="请输入回复关键字"  maxlength="2000" class="layui-input"/>
									</div>
									<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" >
							                     新增
							        </button>
							   </div>
							</div>
							<div class="layui-form-item">
							   <div class="layui-inline">
									<label class="layui-form-label">回复内容</label>
									<div class="layui-input-inline layui-input-inline-one">
											<form:textarea path="replyInfo" placeholder="请输入回复内容" rows="4" maxlength="2000" class="layui-textarea"/>
									</div>
							   </div>
							</div>
							<div class="layui-form-item">
							   <div class="layui-inline">
									<label class="layui-form-label">备注信息</label>
									<div class="layui-input-inline layui-input-inline-one">
											<form:textarea path="remarks" placeholder="请输入备注信息" htmlEscape="false" rows="4" maxlength="255" class="layui-textarea"/>
									</div>
							   </div>
							</div>
					
					<div class="layui-form-item bottom_xf">
						<div class="layui-input-block input500">
							<button type="button" class="layui-btn layui-btn-primary" onclick="gotoView('${ctx}/content/contentReply/');">返回</button>
							<button class="layui-btn" type="submit">保存</button>
							<button onclick="formReset();" type="button"  class="layui-btn layui-btn-danger">重置</button>
						</div>
					</div>
				</form:form>
			</div>

            <jsp:include page="/WEB-INF/views/include/pageJs.jsp" />
			
			<script type="text/javascript">
				$(document).ready(function() {
					$("#inputForm").validate({
						submitHandler: function(form){
							loading('正在提交，请稍等...');
							form.submit();
						},
					/**	在做异步验证的时候需要添加
					    rules: {
						
						},
						messages: {
						
						}, */
						errorContainer: "#messageBox",
						errorPlacement: function(error, element) {
							$("#messageBox").text("输入有误，请先更正。");
							if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
								error.appendTo(element.parent().parent());
							} else {
								error.insertAfter(element);
							}
						}
					});
				});
			</script>
		</body>
		</html>